package com.ruoyi.dishes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dishes.mapper.DishesTypeMapper;
import com.ruoyi.dishes.domain.DishesType;
import com.ruoyi.dishes.service.IDishesTypeService;

/**
 * 菜品分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-24
 */
@Service
public class DishesTypeServiceImpl implements IDishesTypeService 
{
    @Autowired
    private DishesTypeMapper dishesTypeMapper;

    /**
     * 查询菜品分类
     * 
     * @param typeId 菜品分类主键
     * @return 菜品分类
     */
    @Override
    public DishesType selectDishesTypeByTypeId(Long typeId)
    {
        return dishesTypeMapper.selectDishesTypeByTypeId(typeId);
    }

    /**
     * 查询菜品分类列表
     * 
     * @param dishesType 菜品分类
     * @return 菜品分类
     */
    @Override
    public List<DishesType> selectDishesTypeList(DishesType dishesType)
    {
        return dishesTypeMapper.selectDishesTypeList(dishesType);
    }

    /**
     * 新增菜品分类
     * 
     * @param dishesType 菜品分类
     * @return 结果
     */
    @Override
    public int insertDishesType(DishesType dishesType)
    {
        return dishesTypeMapper.insertDishesType(dishesType);
    }

    /**
     * 修改菜品分类
     * 
     * @param dishesType 菜品分类
     * @return 结果
     */
    @Override
    public int updateDishesType(DishesType dishesType)
    {
        return dishesTypeMapper.updateDishesType(dishesType);
    }

    /**
     * 批量删除菜品分类
     * 
     * @param typeIds 需要删除的菜品分类主键
     * @return 结果
     */
    @Override
    public int deleteDishesTypeByTypeIds(Long[] typeIds)
    {
        return dishesTypeMapper.deleteDishesTypeByTypeIds(typeIds);
    }

    /**
     * 删除菜品分类信息
     * 
     * @param typeId 菜品分类主键
     * @return 结果
     */
    @Override
    public int deleteDishesTypeByTypeId(Long typeId)
    {
        return dishesTypeMapper.deleteDishesTypeByTypeId(typeId);
    }
}
